import { TableColumnObject } from 'amis/lib/renderers/Table'
import appService from '@/core/application/service/appService'
import serverColumnUtils, { ServerColumnUtilsProps } from '@/components/amis/ServerColumnUtils/serverColumnUtils'

class AppIdColumnUtils {
	getSchema = (parmas?: Partial<ServerColumnUtilsProps>): TableColumnObject => {
		return serverColumnUtils.getSchema(
			Object.assign(
				{
					name: 'appId',
					label: '应用',
					valueField: 'id',
					labelField: 'title',
					getByIdsWithDebounce: appService.getByIdsWithDebounce,
				},
				parmas,
			),
		)
	}
}

export default new AppIdColumnUtils()
